package client_proxy

import (
	"net/rpc"
	"traning/rpc_traning/rpc_frame/handler"
)

type HelloServiceStub struct {
	*rpc.Client
}

func HelloServiceClient (proto, address string) HelloServiceStub {
	conn, _ := rpc.Dial("tcp", "localhost:1234")
	return HelloServiceStub{conn}
}

func (c *HelloServiceStub) Hello (req string, reply *string) error {
	return c.Call(handler.SerViceName + ".Hello", req, reply)
}
